// 新测试的 menu 菜单
const userMenus = [
  {
    id: 1,
    label: '基础信息管理',
    parentId: '',
    isEnd: 1, // 是否终结点（0表示true终结点，1表示false非终结点）
    path: '/mimi',
    // redirect: '/mimi/list',
    component: 'Main',  // 修改了此处，就可以加载出头部和左侧菜单栏了
    // 当 设置 true 的时候该路由不会在侧边栏出现
    order: 1,
    hidden: false,
    disable: 1, // 是否禁用（0表示禁用，1表示启用；比如新增了菜单，但是未写好代码，就禁用不能访问）
    icon: '',
    children: [
      {
        id: 6,
        label: '资产管理',
        parentId: 1,
        isEnd: 1,
        path: '',
        component: '',
        order: 6,
        hidden: false,
        disable: 1,
        icon: '',
        children: [
          {
            id: 13,
            label: 'U盘资产',
            parentId: 6,
            isEnd: 0,
            path: 'list',
            component: 'AssetsUdiskList',
            order: 13,
            hidden: false,
            disable: 1,
            icon: '',
          },
          {
            id: 14,
            label: '终端资产',
            parentId: 6,
            isEnd: 0,
            path: 'assets/terminalList',
            component: 'AssetsTerminalList',
            order: 14,
            hidden: false,
            disable: 1,
            icon: '',
          },
          {
            id: 15,
            label: '打印机资产',
            parentId: 6,
            isEnd: 0,
            path: 'assets/printerList',
            component: 'AssetsPrinterList',
            order: 15,
            hidden: false,
            disable: 1,
            icon: '',
          },
          {
            id: 16,
            label: '刻录机资产',
            parentId: 6,
            isEnd: 0,
            path: 'assets/burnerList',
            component: 'AssetsBurnerList',
            order: 16,
            hidden: false,
            disable: 1,
            icon: '',
          },
        ]
      },
    ]
  },
]

const adminMenus = [
  {
    id: 1,
    label: '基础信息管理',
    parentId: '',
    isEnd: 1, // 是否终结点（0表示true终结点，1表示false非终结点）
    path: '/mimi',
    // redirect: '/mimi/list',
    component: 'Main',  // 修改了此处，就可以加载出头部和左侧菜单栏了
    // 当 设置 true 的时候该路由不会在侧边栏出现
    order: 1,
    hidden: false,
    disable: 1, // 是否禁用（0表示禁用，1表示启用；比如新增了菜单，但是未写好代码，就禁用不能访问）
    icon: '',
    children: [
      {
        id: 6,
        label: '资产管理',
        parentId: 1,
        isEnd: 1,
        path: '',
        component: '',
        order: 6,
        hidden: false,
        disable: 1,
        icon: '',
        children: [
          {
            id: 13,
            label: 'U盘资产',
            parentId: 6,
            isEnd: 0,
            path: 'list',
            component: 'AssetsUdiskList',
            order: 13,
            hidden: false,
            disable: 1,
            icon: '',
          },
          {
            id: 14,
            label: '终端资产',
            parentId: 6,
            isEnd: 0,
            path: 'assets/terminalList',
            component: 'AssetsTerminalList',
            order: 14,
            hidden: false,
            disable: 1,
            icon: '',
          },
          {
            id: 15,
            label: '打印机资产',
            parentId: 6,
            isEnd: 0,
            path: 'assets/printerList',
            component: 'AssetsPrinterList',
            order: 15,
            hidden: false,
            disable: 1,
            icon: '',
          },
          {
            id: 16,
            label: '刻录机资产',
            parentId: 6,
            isEnd: 0,
            path: 'assets/burnerList',
            component: 'AssetsBurnerList',
            order: 16,
            hidden: false,
            disable: 1,
            icon: '',
          },
        ]
      },
      {
        id: 7,
        label: '人员管理',
        parentId: 1,
        isEnd: 1,
        path: '',
        component: '',
        order: 7,
        hidden: false,
        disable: 1,
        icon: '',
        children: [
          {
            id: 17,
            label: '人员信息',
            parentId: 7,
            isEnd: 0,
            path: 'person/personList',
            component: 'PersonPersonList',
            order: 17,
            hidden: false,
            disable: 1,
            icon: '',
          },
        ]
      },
    ]
  },
  {
    id: 3,
    label: '告警分析',
    parentId: '',
    isEnd: 1, // 是否终结点（0表示true终结点，1表示false非终结点）
    path: '/alarm',
    // redirect: '/mimi/list',
    component: 'Main',  // 修改了此处，就可以加载出头部和左侧菜单栏了
    // 当 设置 true 的时候该路由不会在侧边栏出现
    order: 3,
    hidden: false,
    disable: 1, // 是否禁用（0表示禁用，1表示启用；比如新增了菜单，但是未写好代码，就禁用不能访问）
    icon: '',
    children: [
      {
        id: 10,
        label: '用户行为告警',
        parentId: 3,
        isEnd: 1,
        path: '',
        component: '',
        order: 10,
        hidden: false,
        disable: 1,
        icon: '',
        children: [
          {
            id: 19,
            label: 'U盘使用告警',
            parentId: 10,
            isEnd: 0,
            path: 'list',
            component: 'UdiskAlarm',
            order: 19,
            hidden: false,
            disable: 1,
            icon: '',
          },
          {
            id: 20,
            label: '终端使用告警',
            parentId: 10,
            isEnd: 0,
            path: 'userAlarm/terminalAlarm',
            component: 'TerminalAlarm',
            order: 20,
            hidden: false,
            disable: 1,
            icon: '',
          },
        ]
      },
    ]
  },
  {
    id: 4,
    label: '系统管理',
    parentId: '',
    isEnd: 1, // 是否终结点（0表示true终结点，1表示false非终结点）
    path: '/system',
    // redirect: '/mimi/list',
    component: 'Main',  // 修改了此处，就可以加载出头部和左侧菜单栏了
    // 当 设置 true 的时候该路由不会在侧边栏出现
    order: 4,
    hidden: false,
    disable: 1, // 是否禁用（0表示禁用，1表示启用；比如新增了菜单，但是未写好代码，就禁用不能访问）
    icon: '',
    children: [
      {
        id: 11,
        label: '菜单管理',
        parentId: 4,
        isEnd: 0,
        path: 'list',
        component: 'Menu',
        order: 11,
        hidden: false,
        disable: 1,
        icon: '',
      },
      {
        id: 12,
        label: '角色管理',
        parentId: 4,
        isEnd: 0,
        path: 'role',
        component: 'Role',
        order: 12,
        hidden: false,
        disable: 1,
        icon: '',
      },
    ]
  },
]


// 管理员的权限列表
const adminRoutes = [
  {
    path: '/mimi',
    redirect: '/mimi/list',
    component: 'Main',  // 修改了此处，就可以加载出头部和左侧菜单栏了
    // 当 设置 true 的时候该路由不会在侧边栏出现
    meta: { title: 'Mimi', hidden: false, icon: 'Mimi', roles: ['admin'] },
    children: [
      {
        path: 'list',
        name: 'AssetsUdiskList',
        component: 'AssetsUdiskList',
        meta: { title: 'Assets_udiskList', hidden: false, roles: ['admin'] }
      },
      {
        path: 'assets/terminalList',
        name: 'AssetsTerminalList',
        component: 'AssetsTerminalList',
        meta: { title: 'Assets_terminalList', hidden: false, roles: ['admin'] }
      },
      {
        path: 'assets/printerList',
        name: 'AssetsPrinterList',
        component: 'AssetsPrinterList',
        meta: { title: 'Assets_printerList', hidden: false, roles: ['admin'] }
      },
      {
        path: 'assets/burnerList',
        name: 'AssetsBurnerList',
        component: 'AssetsBurnerList',
        meta: { title: 'Assets_burnerList', hidden: false, roles: ['admin'] }
      },
      {
        path: 'person/personList',
        name: 'PersonPersonList',
        component: 'PersonPersonList',
        meta: { title: 'Person_personList', hidden: false, roles: ['admin'] }
      },
    ]
  },
  {
    path: '/alarm',
    component: 'Main',  // 修改了此处，就可以加载出头部和左侧菜单栏了
    redirect: '/alarm/list',
    meta: { title: 'UdiskAlarm', hidden: false, icon: 'udiskAlarm', roles: ['admin'] },
    children: [
      {
        path: 'list',
        name: 'UdiskAlarm',
        component: 'UdiskAlarm',
        meta: { title: 'Udisk_alarm', hidden: false, roles: ['admin'] }
      },
      {
        path: 'userAlarm/terminalAlarm',
        name: 'TerminalAlarm',
        component: 'TerminalAlarm',
        meta: { title: 'Terminal_alarm', hidden: false, roles: ['admin'] }
      },
    ]
  },
  {
    path: '/system',
    component: 'Main',
    redirect: '/system/list',
    meta: { title: 'System', hidden: false, icon: 'System' },
    children: [
      {
        path: 'list',
        name: 'SystemMenu',
        component: 'Menu',
        meta: { title: 'System_menu', hidden: false }
      },
      {
        path: 'role',
        name: 'SystemRole',
        component: 'Role',
        // activeMenu: '/system/list'  当路由设置了该属性，则会高亮相对应的侧边栏
        // 这在某些场景非常有用，如 一个系统的列表页路由为： /system/list
        // 点击列表进入列表详情页，这时候路由为 /system/1 ，但你想在侧边栏高亮系统列表的路由，就可以进行如下设置
        meta: { title: 'SystemAdd', activeMenu: '/system/list', hidden: true }
      }
    ]
  },
]
// 用户的权限列表
const userRoutes = [
  {
    path: '/mimi',
    redirect: '/mimi/list',
    // component: () => import('../views/Lay'),
    component: 'Main',  // 修改了此处，就可以加载出头部和左侧菜单栏了
    // 当 设置 true 的时候该路由不会在侧边栏出现
    meta: { title: 'Mimi', hidden: false, icon: 'Mimi', roles: ['user'] },
    children: [
      {
        path: 'list',
        name: 'AssetsUdiskList',
        component: 'AssetsUdiskList',
        meta: { title: 'Assets_udiskList', hidden: false, roles: ['user'] }
      },
      {
        path: 'assets/terminalList',
        name: 'AssetsTerminalList',
        component: 'AssetsTerminalList',
        meta: { title: 'Assets_terminalList', hidden: false, roles: ['user'] }
      },
      {
        path: 'assets/printerList',
        name: 'AssetsPrinterList',
        component: 'AssetsPrinterList',
        meta: { title: 'Assets_printerList', hidden: false, roles: ['user'] }
      },
      {
        path: 'assets/burnerList',
        name: 'AssetsBurnerList',
        component: 'AssetsBurnerList',
        meta: { title: 'Assets_burnerList', hidden: false, roles: ['user'] }
      },
    ]
  },
]